/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "ponto_escala")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "PontoEscala.findAll", query = "SELECT p FROM PontoEscala p")})
public class PontoEscala implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(length = 50)
    private String nome;
    @Column(name = "DESCONTO_HORA_DIA", length = 8)
    private String descontoHoraDia;
    @Column(name = "DESCONTO_DSR", length = 8)
    private String descontoDsr;
    @Column(name = "CODIGO_HORARIO_DOMINGO", length = 2)
    private String codigoHorarioDomingo;
    @Column(name = "CODIGO_HORARIO_SEGUNDA", length = 2)
    private String codigoHorarioSegunda;
    @Column(name = "CODIGO_HORARIO_TERCA", length = 2)
    private String codigoHorarioTerca;
    @Column(name = "CODIGO_HORARIO_QUARTA", length = 2)
    private String codigoHorarioQuarta;
    @Column(name = "CODIGO_HORARIO_QUINTA", length = 2)
    private String codigoHorarioQuinta;
    @Column(name = "CODIGO_HORARIO_SEXTA", length = 2)
    private String codigoHorarioSexta;
    @Column(name = "CODIGO_HORARIO_SABADO", length = 2)
    private String codigoHorarioSabado;
    @JoinColumn(name = "ID_EMPRESA", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private Empresa idEmpresa;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idPontoEscala")
    private List<PontoTurma> pontoTurmaList;

    public PontoEscala() {
    }

    public PontoEscala(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getDescontoHoraDia() {
        return descontoHoraDia;
    }

    public void setDescontoHoraDia(String descontoHoraDia) {
        this.descontoHoraDia = descontoHoraDia;
    }

    public String getDescontoDsr() {
        return descontoDsr;
    }

    public void setDescontoDsr(String descontoDsr) {
        this.descontoDsr = descontoDsr;
    }

    public String getCodigoHorarioDomingo() {
        return codigoHorarioDomingo;
    }

    public void setCodigoHorarioDomingo(String codigoHorarioDomingo) {
        this.codigoHorarioDomingo = codigoHorarioDomingo;
    }

    public String getCodigoHorarioSegunda() {
        return codigoHorarioSegunda;
    }

    public void setCodigoHorarioSegunda(String codigoHorarioSegunda) {
        this.codigoHorarioSegunda = codigoHorarioSegunda;
    }

    public String getCodigoHorarioTerca() {
        return codigoHorarioTerca;
    }

    public void setCodigoHorarioTerca(String codigoHorarioTerca) {
        this.codigoHorarioTerca = codigoHorarioTerca;
    }

    public String getCodigoHorarioQuarta() {
        return codigoHorarioQuarta;
    }

    public void setCodigoHorarioQuarta(String codigoHorarioQuarta) {
        this.codigoHorarioQuarta = codigoHorarioQuarta;
    }

    public String getCodigoHorarioQuinta() {
        return codigoHorarioQuinta;
    }

    public void setCodigoHorarioQuinta(String codigoHorarioQuinta) {
        this.codigoHorarioQuinta = codigoHorarioQuinta;
    }

    public String getCodigoHorarioSexta() {
        return codigoHorarioSexta;
    }

    public void setCodigoHorarioSexta(String codigoHorarioSexta) {
        this.codigoHorarioSexta = codigoHorarioSexta;
    }

    public String getCodigoHorarioSabado() {
        return codigoHorarioSabado;
    }

    public void setCodigoHorarioSabado(String codigoHorarioSabado) {
        this.codigoHorarioSabado = codigoHorarioSabado;
    }

    public Empresa getIdEmpresa() {
        return idEmpresa;
    }

    public void setIdEmpresa(Empresa idEmpresa) {
        this.idEmpresa = idEmpresa;
    }

    @XmlTransient
    public List<PontoTurma> getPontoTurmaList() {
        return pontoTurmaList;
    }

    public void setPontoTurmaList(List<PontoTurma> pontoTurmaList) {
        this.pontoTurmaList = pontoTurmaList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PontoEscala)) {
            return false;
        }
        PontoEscala other = (PontoEscala) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.PontoEscala[ id=" + id + " ]";
    }
    
}
